<template>
  <div>
    <div class="banner" @click="handleshowGallaryClick">
      <img class="banner-img" src="http://img1.qunarzz.com/sight/p0/1409/19/adca619faaab0898245dc4ec482b5722.jpg_600x330_f922b488.jpg" alt="">
      <div class="banner-info">
        <div class="banner-title">故宫博物馆(AAAAA景区)</div>
        <div class="banner-number">
          <span class="iconfont banner-icon">&#xe625;</span>
          66
        </div>
      </div>
    </div>
    <CommonGallary :imgs="imgs" v-show="showGallary" @change="change"></CommonGallary>
  </div>
</template>
<script>
import CommonGallary from 'common/gallary/Gallary'
export default {
  name: 'DetailBanner',
  components: {
    CommonGallary
  },
  data () {
    return {
      showGallary: false,
      imgs: ['http://img1.qunarzz.com/sight/p55/201211/04/fbcab3e5d6479ce893835fbb.jpg_r_800x800_6360f514.jpg', 'http://img1.qunarzz.com/wugc/p123/201211/19/a2045d091f02b25493835fbb.png_r_800x800_c59f0eba.png', 'http://img1.qunarzz.com/sight/p0/1410/34/f540a04367d06820af4dfeaf0ad40257.water.jpg_r_800x800_479f9b55.jpg']
    }
  },
  methods: {
    handleshowGallaryClick () {
      this.showGallary = true
    },
    change () {
      this.showGallary = false
    }
  }
}
</script>

<style lang="stylus" scoped>
  .banner
    position: relative
    overflow: hidden
    height: 0
    padding-bottom 55%
    .banner-img
      width: 100%
    .banner-info
      color: #fff
      display flex
      position: absolute
      bottom: 0
      left: 0
      right: 0
      bottom: 0
      line-height: .6rem
      background-image: linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,.8))
      .banner-title
        font-size .28rem
        padding 0 .2rem
        flex 1
      .banner-number
        margin-top .14rem
        margin-right .2rem
        padding:0 .2rem
        line-height: .32rem
        height: .32rem
        border-radius: .2rem;
        background: rgba(0,0,0,.6)
        font-size .24rem
        .banner-icon
          font-size .24rem
</style>
